<template>
  <div>
    <el-form ref="ruleFormRef"  :model="ruleForm" :rules="rules" label-width="auto" class="demo-ruleForm" status-icon>
      <el-form-item label="名称" prop="name">
        <el-input v-model="ruleForm.name" />
      </el-form-item>
    
      <el-form-item label="通知方式" prop="name">
        <el-select v-model="ruleForm.name" placeholder="Activity zone" style="width: 100%;">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="地址" prop="name">
        <el-input v-model="ruleForm.name" />
      </el-form-item>
      
      <el-form-item label="状态" prop="name">
        <el-switch v-model="ruleForm.name" class="ml-2" inline-prompt active-text="启用" inactive-text="关闭" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949" />
      </el-form-item>
    </el-form>

  </div>
</template>

<script setup lang="ts">

const data = reactive({
  ruleForm: { 
    name: ''
  },
  rules: {
    name: [
      { required: true, message: 'Please input Activity name', trigger: 'blur' },
      { min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' }
    ]
  }
});

const { ruleForm, rules } = toRefs(data);
</script>

<style scoped>
</style>